using System.ComponentModel;
using System.Runtime.Serialization;

namespace LeadTracker.Models
{

	[DataContract(Namespace = @"http://granite.codeplex.com/LeadTracker", Name = @"LeadType")]
	public enum LeadType
	{

		[EnumMember()]
		[Description(@"Raw Lead")]
		RawLead = 0,

		[EnumMember()]
		[Description(@"News Report")]
		NewsReport = 1,

		[EnumMember()]
		[Description(@"Article")]
		Article = 2,

		[EnumMember()]
		[Description(@"Interview")]
		Interview = 3,


	}

	public static partial class LeadTypeExtension
	{
		public static string ToDescription(this LeadType value)
		{
			var result = ToDescription(value, null);
			if (result == null)
				throw new global::System.ArgumentOutOfRangeException("value");
			else
				return result;
		}

		public static string ToDescription(this LeadType value, string defaultValue)
		{
			switch (value)
			{
				case LeadType.RawLead: return @"Raw Lead";
				case LeadType.NewsReport: return @"News Report";
				case LeadType.Article: return @"Article";
				case LeadType.Interview: return @"Interview";
				default: return defaultValue;
			}
		}
	}
}

